package algorithm.leetcode.offer53;

public class Solution {
    public int missingNumber(int[] nums) {


            for(int i=0;i<nums.length;i++){
                if(i!=nums[i]){
                    return i;
                }
            }
            return nums[nums.length-1]+1;
        }

    public static void main(String[] args) {
        int[] nums = {1};
        Solution solution = new Solution();
        System.out.println(solution.missingNumber(nums));
    }
}